<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>屏蔽右键，键盘事件</title>
</head>

<body onkeydown="keydown();">


  <input type="text" oncopy="return false" oncut="return false">
  <input type="button" value="click" onclick="this.disabled = true; this.form.submit(); ">

  <script>
    function keydown() {

      if (event.keyCode == 13) {
      
        event.returnValue = false;
        alert("禁止使用回车键 ");
      }
    }

    function click() {
      event.returnValue = false;
      alert('禁止鼠标右键');
    }

    document.oncontextmenu = click;
  </script>
</body>

</html>